<!DOCTYPE html>  
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN"> 
<head> 
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<title>订单管理</title>
	<!-- 常规css -->
    <link th:href="@{bootstrap/css/bootstrap.min.css}" rel="stylesheet" />
    <link th:href="@{font-awesome/css/font-awesome.min.css}" rel="stylesheet" />
    <!-- 项目css -->
    <link th:href="@{css/layout.css}" rel="stylesheet" />
</head> 
<body th:with="asort=${#httpServletRequest.getParameter('sort')}, aorder=${#httpServletRequest.getParameter('order')}, num=${data.num}, pageIndex=${data.pageIndex}, aordersStatus=${#httpServletRequest.getParameter('ordersStatus')}, aordersType=${#httpServletRequest.getParameter('ordersType')}, ashopId=${#httpServletRequest.getParameter('shopId')}, aoutTradeNo=${#httpServletRequest.getParameter('outTradeNo')}, anickname=${#httpServletRequest.getParameter('nickname')}, agoodsName=${#httpServletRequest.getParameter('goodsName')} ">
	<!-- 侧边导航栏 -->
	<div th:replace="aframe::sideNavigation"></div>
	
	<!-- 主页面 -->
	<div class="content" style="padding:0">
		<!-- 顶部导航栏 -->
		<div th:replace="aframe::topNavigation"></div>
		<!-- 内容 -->

		<!-- 标签页内容 -->
		<div role="tabpanel" class="tab-pane active" id="history" style="margin:20px">
			<div class="panel panel-default" >
				<div class="panel-heading" style="height: 100px">
					<h4>订单管理&nbsp;&nbsp;</h4>
					<!-- 筛选 -->
					<form action="" method="get">
					<div class="form-group">
						<span class="control-label sort-title col-sm-1">状态：</span>
						<select class="form-control sort-content col-sm-2" name="ordersStatus" id="s_ordersStatus">
							<option value="-1" th:selected="${aordersStatus}==-1">不限</option>
							<option value="0" th:selected="${aordersStatus}==0">待支付</option>
							<option value="1" th:selected="${aordersStatus}==1">待发货</option>
							<option value="2" th:selected="${aordersStatus}==2">待收货</option>
							<option value="3" th:selected="${aordersStatus}==3">已收货</option>
							<option value="4" th:selected="${aordersStatus}==4">交易关闭</option>
							<option value="5" th:selected="${aordersStatus}==5">支付失败</option>
							<option value="6" th:selected="${aordersStatus}==6">退款申请中</option>
							<option value="7" th:selected="${aordersStatus}==7">等待退款到账</option>
							<option value="8" th:selected="${aordersStatus}==8">已退款</option>
							<option value="9" th:selected="${aordersStatus}==9">退款失败</option>
						</select>
						<span class="control-label sort-title col-sm-1">类型：</span>
						<select class="form-control sort-content col-sm-2" name="ordersType" id="s_ordersType">
							<option value="-1" th:selected="${aordersType}==-1">不限</option>
							<option value="0" th:selected="${aordersType}==0">普通商品</option>
							<option value="2" th:selected="${aordersType}==2">卡券商品</option>
							<option value="4" th:selected="${aordersType}==4">秒杀订单</option>
							<option value="5" th:selected="${aordersType}==5">拍卖订单</option>
							<option value="1" th:selected="${aordersType}==1">会员开通</option>
							<option value="3" th:selected="${aordersType}==3">账户充值</option>
						</select>
						<span class="control-label sort-title col-sm-1">店铺：</span>
						<select class="form-control sort-content col-sm-2" name="shopId" id="s_shopId">
							<option value="-1" th:selected="${ashopId}==-1">不限</option>
						</select>
						<span class="control-label sort-title col-sm-1">交易号：</span>
						<input type="text" class="form-control sort-content col-sm-4" name="outTradeNo" id="s_outTradeNo" placeholder="不限" th:value="${aoutTradeNo}">
						<span class="control-label sort-title col-sm-1">用户名：</span>
						<input type="text" class="form-control sort-content col-sm-4" name="nickname" id="s_nickname" placeholder="不限" th:value="${anickname}">
						<span class="control-label sort-title col-sm-1">商品名：</span>
						<input type="text" class="form-control sort-content col-sm-4" name="goodsName" id="s_goodsName" placeholder="不限" th:value="${agoodsName}">
						<button type="submit" class="btn btn-success" style="margin-left: 50px">筛选</button>
					</div>
					</form>
				</div>
				<div class="panel-body table-responsive">
					<table class="table table-hover">
						<thead>
						<tr>
							<th th:if="${asort != 1+''}"><a th:href="@{orders(sort=1,order=1,pageIndex=1,num=${num},ordersStatus=${aordersStatus},ordersType=${aordersType},shopId=${ashopId},outTradeNo=${aoutTradeNo},nickname=${anickname},goodsName=${agoodsName})}">编号<i class="fa fa-fw fa-sort"></i></a></th>
							<th th:if="${asort == 1+'' && aorder == 1+''}"><a th:href="@{orders(sort=1,order=-1,pageIndex=1,num=${num},ordersStatus=${aordersStatus},ordersType=${aordersType},shopId=${ashopId},outTradeNo=${aoutTradeNo},nickname=${anickname},goodsName=${agoodsName})}">编号<i class="fa fa-fw fa-sort-asc"></i></a></th>
							<th th:if="${asort == 1+'' && aorder == -1+''}"><a th:href="@{orders(sort=1,order=1,pageIndex=1,num=${num},ordersStatus=${aordersStatus},ordersType=${aordersType},shopId=${ashopId},outTradeNo=${aoutTradeNo},nickname=${anickname},goodsName=${agoodsName})}">编号<i class="fa fa-fw fa-sort-desc"></i></a></th>
							<th>订单类型</th>
							<th th:if="${asort != 2+''}"><a th:href="@{orders(sort=2,order=1,pageIndex=1,num=${num},ordersStatus=${aordersStatus},ordersType=${aordersType},shopId=${ashopId},outTradeNo=${aoutTradeNo},nickname=${anickname},goodsName=${agoodsName})}">用户名<i class="fa fa-fw fa-sort"></i></a></th>
							<th th:if="${asort == 2+'' && aorder == 1+''}"><a th:href="@{orders(sort=2,order=-1,pageIndex=1,num=${num},ordersStatus=${aordersStatus},ordersType=${aordersType},shopId=${ashopId},outTradeNo=${aoutTradeNo},nickname=${anickname},goodsName=${agoodsName})}">用户名<i class="fa fa-fw fa-sort-asc"></i></a></th>
							<th th:if="${asort == 2+'' && aorder == -1+''}"><a th:href="@{orders(sort=2,order=1,pageIndex=1,num=${num},ordersStatus=${aordersStatus},ordersType=${aordersType},shopId=${ashopId},outTradeNo=${aoutTradeNo},nickname=${anickname},goodsName=${agoodsName})}">用户名<i class="fa fa-fw fa-sort-desc"></i></a></th>
							<th th:if="${asort != 3+''}"><a th:href="@{orders(sort=3,order=1,pageIndex=1,num=${num},ordersStatus=${aordersStatus},ordersType=${aordersType},shopId=${ashopId},outTradeNo=${aoutTradeNo},nickname=${anickname},goodsName=${agoodsName})}">商品ID<i class="fa fa-fw fa-sort"></i></a></th>
							<th th:if="${asort == 3+'' && aorder == 1+''}"><a th:href="@{orders(sort=3,order=-1,pageIndex=1,num=${num},ordersStatus=${aordersStatus},ordersType=${aordersType},shopId=${ashopId},outTradeNo=${aoutTradeNo},nickname=${anickname},goodsName=${agoodsName})}">商品ID<i class="fa fa-fw fa-sort-asc"></i></a></th>
							<th th:if="${asort == 3+'' && aorder == -1+''}"><a th:href="@{orders(sort=3,order=1,pageIndex=1,num=${num},ordersStatus=${aordersStatus},ordersType=${aordersType},shopId=${ashopId},outTradeNo=${aoutTradeNo},nickname=${anickname},goodsName=${agoodsName})}">商品ID<i class="fa fa-fw fa-sort-desc"></i></a></th>
							<th>商品名</th>
							<th>商品数量</th>
							<th th:if="${asort != 4+''}"><a th:href="@{orders(sort=4,order=1,pageIndex=1,num=${num},ordersStatus=${aordersStatus},ordersType=${aordersType},shopId=${ashopId},outTradeNo=${aoutTradeNo},nickname=${anickname},goodsName=${agoodsName})}">订单价格<i class="fa fa-fw fa-sort"></i></a></th>
							<th th:if="${asort == 4+'' && aorder == 1+''}"><a th:href="@{orders(sort=4,order=-1,pageIndex=1,num=${num},ordersStatus=${aordersStatus},ordersType=${aordersType},shopId=${ashopId},outTradeNo=${aoutTradeNo},nickname=${anickname},goodsName=${agoodsName})}">订单价格<i class="fa fa-fw fa-sort-asc"></i></a></th>
							<th th:if="${asort == 4+'' && aorder == -1+''}"><a th:href="@{orders(sort=4,order=1,pageIndex=1,num=${num},ordersStatus=${aordersStatus},ordersType=${aordersType},shopId=${ashopId},outTradeNo=${aoutTradeNo},nickname=${anickname},goodsName=${agoodsName})}">订单价格<i class="fa fa-fw fa-sort-desc"></i></a></th>
							<th>支付方式</th>
							<th>订单状态</th>
							<th th:if="${asort != 5+''}"><a th:href="@{orders(sort=5,order=1,pageIndex=1,num=${num},ordersStatus=${aordersStatus},ordersType=${aordersType},shopId=${ashopId},outTradeNo=${aoutTradeNo},nickname=${anickname},goodsName=${agoodsName})}">创建时间<i class="fa fa-fw fa-sort"></i></a></th>
							<th th:if="${asort == 5+'' && aorder == 1+''}"><a th:href="@{orders(sort=5,order=-1,pageIndex=1,num=${num},ordersStatus=${aordersStatus},ordersType=${aordersType},shopId=${ashopId},outTradeNo=${aoutTradeNo},nickname=${anickname},goodsName=${agoodsName})}">创建时间<i class="fa fa-fw fa-sort-asc"></i></a></th>
							<th th:if="${asort == 5+'' && aorder == -1+''}"><a th:href="@{orders(sort=5,order=1,pageIndex=1,num=${num},ordersStatus=${aordersStatus},ordersType=${aordersType},shopId=${ashopId},outTradeNo=${aoutTradeNo},nickname=${anickname},goodsName=${agoodsName})}">创建时间<i class="fa fa-fw fa-sort-desc"></i></a></th>
							<th th:if="${asort != 6+''}"><a th:href="@{orders(sort=6,order=1,pageIndex=1,num=${num},ordersStatus=${aordersStatus},ordersType=${aordersType},shopId=${ashopId},outTradeNo=${aoutTradeNo},nickname=${anickname},goodsName=${agoodsName})}">支付时间<i class="fa fa-fw fa-sort"></i></a></th>
							<th th:if="${asort == 6+'' && aorder == 1+''}"><a th:href="@{orders(sort=6,order=-1,pageIndex=1,num=${num},ordersStatus=${aordersStatus},ordersType=${aordersType},shopId=${ashopId},outTradeNo=${aoutTradeNo},nickname=${anickname},goodsName=${agoodsName})}">支付时间<i class="fa fa-fw fa-sort-asc"></i></a></th>
							<th th:if="${asort == 6+'' && aorder == -1+''}"><a th:href="@{orders(sort=6,order=1,pageIndex=1,num=${num},ordersStatus=${aordersStatus},ordersType=${aordersType},shopId=${ashopId},outTradeNo=${aoutTradeNo},nickname=${anickname},goodsName=${agoodsName})}">支付时间<i class="fa fa-fw fa-sort-desc"></i></a></th>
							<th>操作</th>
						</tr>
						</thead>
						<tbody>
						<tr th:each="order: ${data.list}">
							<th scope="row" th:text="${order?.ordersId}">编号</th>
							<div th:switch="${order?.ordersType}">
								<td th:case="0">普通</td>
								<td th:case="1">会员开通</td>
								<td th:case="2">卡券</td>
								<td th:case="3">充值</td>
								<td th:case="4">秒杀</td>
								<td th:case="5">拍卖</td>
							</div>
							<td th:text="${order?.nickname}">用户昵称</td>
							<td th:text="${order?.goodsId}">商品id</td>
							<td th:text="${order?.goodsName}">商品名</td>
							<td th:text="${order?.goodsCount}">商品数量</td>
							<td th:text="${order?.ordersPrice}">订单价格</td>
							<td th:text="${order?.payType}">支付方式</td>
							<div th:switch="${order?.ordersStatus}">
								<td th:case="0">待支付</td>
								<td th:case="1">待发货</td>
								<td th:case="2">待收货</td>
								<td th:case="3">已收货</td>
								<td th:case="4">交易关闭</td>
								<td th:case="5">支付失败</td>
								<td th:case="6">退款申请中</td>
								<td th:case="7">等待退款到账</td>
								<td th:case="8">已退款</td>
								<td th:case="9">退款失败</td>
							</div>
							<td th:text="${#dates.format(order?.ordersTime, 'yyyy-MM-dd')}">创建时间</td>
							<td th:text="${#dates.format(order?.payTime, 'yyyy-MM-dd')}">支付时间</td>
							<td>
								<button class="btn btn-sm btn-info" th:onclick="showDetail([[${order?.ordersId}]])">详情</button>
								<button class="btn btn-sm btn-info" th:onclick="showComment([[${order?.ordersId}]])">评价</button>
								<button class="btn btn-sm btn-primary" th:if="${order?.ordersStatus eq 1}" th:onclick="showSend([[${order?.ordersId}]])">发货</button>
								<button class="btn btn-sm btn-warning" th:if="${order?.ordersStatus eq 1 || order?.ordersStatus eq 2|| order?.ordersStatus eq 6}" th:onclick="showRefund([[${order?.ordersId}]])">退款</button>
							</td>
						</tr>
						</tbody>
					</table>

					<!-- 分页组件 -->
					<nav aria-label="Page navigation" th:fragment="pagingBar">
						<ul class="pagination">
							<!-- 上一页 -->
							<li>
								<a th:href="@{${#httpServletRequest.requestURL}(sort=${asort}, order=${aorder}, pageIndex=${data.pageIndex}-1, num=${data.num}, totalPages=${data.totalPages}, ordersStatus=${aordersStatus},ordersType=${aordersType},shopId=${ashopId},outTradeNo=${aoutTradeNo},nickname=${anickname},goodsName=${agoodsName})}" aria-label="Previous" th:if="${1 ne data.pageIndex}">
									<span aria-hidden="true">上一页</span>
								</a>
								<a href="#" th:if="${1 eq data.pageIndex}" style="color: #888888;pointer-events: none;">
									<span aria-hidden="true">上一页</span>
								</a>
							</li>
							<!-- 中间页 -->
							<li th:if="${data.totalPages>0}" th:each="pageIdx:${#numbers.sequence(1, data.totalPages)}">
								<a th:href="@{${#httpServletRequest.requestURL}(sort=${asort}, order=${aorder}, pageIndex=${pageIdx}, num=${data.num}, totalPages=${data.totalPages}, ordersStatus=${aordersStatus},ordersType=${aordersType},shopId=${ashopId},outTradeNo=${aoutTradeNo},nickname=${anickname},goodsName=${agoodsName} )}" th:text="${pageIdx}" th:if="${pageIdx ne data.pageIndex}"></a>
								<a href="#" th:text="${pageIdx}" th:if="${pageIdx eq data.pageIndex}" th:style="'font-weight:bold;background: #6faed9;pointer-events: none;'"></a>
							</li>
							<li th:if="${data.totalPages==0}">
								<a href="#" th:text="${1}" th:style="'font-weight:bold;background: #6faed9;pointer-events: none;'"></a>
							</li>
							<!-- 下一页 -->
							<li th:if="${data.totalPages>0}">
								<a th:href="@{${#httpServletRequest.requestURL}(sort=${asort}, order=${aorder}, pageIndex=${data.pageIndex}+1, num=${data.num}, totalPages=${data.totalPages}, ordersStatus=${aordersStatus},ordersType=${aordersType},shopId=${ashopId},outTradeNo=${aoutTradeNo},nickname=${anickname},goodsName=${agoodsName} )}" aria-label="Next" th:if="${data.totalPages ne data.pageIndex}">
									<span aria-hidden="true">下一页</span>
								</a>
								<a href="#" th:if="${data.totalPages eq data.pageIndex}" style="color: #888888;pointer-events: none;">
									<span aria-hidden="true">下一页</span>
								</a>
							</li>
							<li th:if="${data.totalPages==0}">
								<a href="#" style="color: #888888;pointer-events: none;">
									<span aria-hidden="true">下一页</span>
								</a>
							</li>
						</ul>
					</nav>

				</div>
			</div>
		</div>
	</div>
		<!-- end 内容 -->
	<!-- end 主页面 -->

	<!-- 模态框: 信息 -->
	<form class="form-horizontal" role="form" id="detailForm" style="margin: 20px;">
		<div class="modal fade" id="detailModal" tabindex="-1" role="dialog" aria-labelledby="detailModalLabel" aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
						<h4 class="modal-title" id="detailModalLabel"> 订单详情 </h4>
					</div>
					<div class="modal-body">

						<fieldset>
							<legend>订单信息</legend>
							<div class="form-group">
								<label class="col-sm-3 control-label">订单ID</label>
								<div class="col-sm-7">
									<p class="form-control-static" id="d_ordersId"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">订单编号</label>
								<div class="col-sm-7">
									<p class="form-control-static" id="d_ordersNo"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">商户订单号</label>
								<div class="col-sm-7">
									<p class="form-control-static" id="d_outTradeNo"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">订单备注</label>
								<div class="col-sm-7">
									<p class="form-control-static" id="d_ordersRemark"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">快递单号</label>
								<div class="col-sm-7">
									<p class="form-control-static" id="d_expressNo"></p>
								</div>
							</div>
						</fieldset>

						<fieldset>
							<legend>商品信息</legend>
							<div class="form-group">
								<label class="col-sm-3 control-label">商品ID</label>
								<div class="col-sm-7">
									<p class="form-control-static" id="d_goodsId"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">商品名</label>
								<div class="col-sm-7">
									<p class="form-control-static" id="d_goodsName"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">商品参数</label>
								<div class="col-sm-7">
									<p class="form-control-static" id="d_goodsParam"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">商品图片</label>
								<div class="col-sm-7">
									<img class="form-control-static" id="d_goodsPic" alt="商品图片" style="height:100px;max-height: 100px">
								</div>
							</div>
						</fieldset>

						<fieldset>
							<legend>商家信息</legend>
							<div class="form-group">
								<label class="col-sm-3 control-label">商家ID</label>
								<div class="col-sm-7">
									<p class="form-control-static" id="d_shopId"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">商家名称</label>
								<div class="col-sm-7">
									<p class="form-control-static" id="d_shopName"></p>
								</div>
							</div>
						</fieldset>

						<fieldset>
							<legend>用户信息</legend>
							<div class="form-group">
								<label class="col-sm-3 control-label">用户ID</label>
								<div class="col-sm-7">
									<p class="form-control-static" id="d_wxUserId"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">用户昵称</label>
								<div class="col-sm-7">
									<p class="form-control-static" id="d_nickname"></p>
								</div>
							</div>
						</fieldset>

						<fieldset>
							<legend>配送信息</legend>
							<div class="form-group">
								<label class="col-sm-3 control-label">收货ID</label>
								<div class="col-sm-7">
									<p class="form-control-static" id="d_deliveryId"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">省市区</label>
								<div class="col-sm-7">
									<p class="form-control-static" id="d_deliveryCity"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">详细地址</label>
								<div class="col-sm-7">
									<p class="form-control-static" id="d_deliveryAddr"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">真实姓名</label>
								<div class="col-sm-7">
									<p class="form-control-static" id="d_deliveryName"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">联系电话</label>
								<div class="col-sm-7">
									<p class="form-control-static" id="d_deliveryPhone"></p>
								</div>
							</div>
						</fieldset>

					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					</div>
				</div>
			</div>
		</div>
	</form>


	<!-- 模态框: 评价 -->
	<form class="form-horizontal" role="form" id="commentForm" style="margin: 20px;">
		<div class="modal fade" id="commentModal" tabindex="-1" role="dialog" aria-labelledby="commentModalLabel" aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
						<h4 class="modal-title" id="commentModalLabel"> 订单评价 </h4>
					</div>
					<div class="modal-body">
						<div class="form-group">
							<input type="text" hidden="hidden" id="c_goodsComId">
							<label class="col-sm-3 control-label">订单ID</label>
							<div class="col-sm-7">
								<p class="form-control-static" id="c_ordersId"></p>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">用户ID</label>
							<div class="col-sm-7">
								<p class="form-control-static" id="c_wxUserId"></p>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">评论内容</label>
							<div class="col-sm-7">
								<p class="form-control-static" id="c_goodsComText"></p>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">评分</label>
							<div class="col-sm-7">
								<p class="form-control-static" id="c_goodsComScore"></p>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">评论时间</label>
							<div class="col-sm-7">
								<p class="form-control-static" id="c_goodsComTime"></p>
							</div>
						</div>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-danger" id="delComButton">删除</button>
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					</div>
				</div>
			</div>
		</div>
	</form>




	<!-- 模态框: 填写快递单号 -->
	<form class="form-horizontal" role="form" id="sendForm" style="margin: 20px;">
		<div class="modal fade" id="sendModal" tabindex="-1" role="dialog" aria-labelledby="sendModalLabel" aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
						<h4 class="modal-title" id="sendModalLabel"> 填写快递信息 </h4>
					</div>
					<div class="modal-body">
						<div class="form-group">
							<label class="col-sm-3 control-label">快递单号</label>
							<div class="col-sm-7">
								<input type="text" id="ordersId" name="ordersId" hidden="hidden"></input>
								<input type="text" class="form-control" name="expressNo"></input>
							</div>
						</div>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
						<button type="button" class="btn btn-primary" id="sendButton">确认发货</button>
					</div>
				</div>
			</div>
		</div>
	</form>


	<!-- 模态框: 修改密码 -->
	<div th:replace="aframe::modifyPwd"></div>


<!-- 常规js -->
<script th:src="@{js/jquery-3.4.1.min.js}"></script>
<script th:src="@{bootstrap/js/bootstrap.min.js}"></script>
<!-- 模板js -->
<script th:replace="aframe::js-highlight"></script>
<!-- 项目js -->
<script th:src="@{js/md5.js}"></script>
<script th:src="@{js/setpwd.js}"></script>
<!-- 页面js -->
<script th:src="@{js/orders.js}"></script>

<script>
	function getQueryVariable(variable)
	{
		var query = window.location.search.substring(1);
		var vars = query.split("&");
		for (var i=0;i<vars.length;i++) {
			var pair = vars[i].split("=");
			if(pair[0] == variable){return pair[1];}
		}
		return(null);
	}

	$(function () {
		$.ajax({
			url : "goods/shoplist",
			async : true,
			type : "GET",
			data : {},
			success : function (res) {
				var nowShopId = getQueryVariable("shopId");
				var list = res.data;
				for(var i in list){
					if(list[i].shopId == nowShopId) {
						$("#s_shopId").append('<option value='+list[i].shopId+' selected>'+list[i].shopName+'</option>');
					} else {
						$("#s_shopId").append('<option value='+list[i].shopId+'>'+list[i].shopName+'</option>');
					}
				}
			},
			error : function(res) {
				alert("店铺信息获取失败");
			},
			dataType : "json"
		});
	})
</script>

</body>
</html> 

